package com.stox.ui.swing.action;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.stox.ui.swing.presenter.NavigatorViewPresenter;
import com.stox.ui.swing.view.NavigatorView;

@Component
public class NewNavigatorAction implements ActionListener {

	@Autowired
	private NavigatorViewPresenter navigatorViewPresenter;
	
	@Autowired
	private NavigatorView navigatorView;
	
	@Override
	public void actionPerformed(ActionEvent e) {

		if(!navigatorView.isVisible()){
	
			navigatorViewPresenter.present(navigatorView);
		
		}
	
	}

}
